﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XjjXmm.Spider
{
    [SplitTable(SplitType._Custom01)]
    [SugarTable("chapter")]
    [Tenant("1")]
    public class BookChapter
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
        public long Id { get; set; }

        /// <summary>
        /// 小说id
        /// </summary>
        [SugarColumn(ColumnName = "novel_id")]
        [SplitField] //标识一下分表字段
        public long NovelId { get; set; }

        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "title")]
        public string Title { get; set; } = "";
    }

    [SugarTable("Chapter")]
    [Tenant("0")]
    internal class NovelChapter
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public long Id { get; set; }

        /// <summary>
        /// 小说id
        /// </summary>
        [SugarColumn(ColumnName = "novel_id")]
        public int NovelId { get; set; }

        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "link")]
        public string Link { get; set; } = "";

        /// <summary>
        /// 作者
        /// </summary>
        [SugarColumn(ColumnName = "content")]
        public string Content { get; set; } = "";


    }
}
